package cn.opopopo.design_pattern_learn.结构型.composite;

class File extends FileSystemComponent {
    private int size; // 模拟文件大小（KB）

    public File(String name, int size) {
        super(name);
        this.size = size;
    }

    @Override
    public void showDetails() {
        System.out.println("📄 文件: " + name + " (" + size + "KB)");
    }
}